<%
	//->获取HTTP传输参数
	function Read()
	{
		if(arguments.length>1)
		{
			var returnValue=[];
			for(var iarguments=0;iarguments<=arguments.length-1;iarguments++){
				returnValue.push(Request(arguments[iarguments]).item);
			}
			return returnValue;
		}
		else
		{
			return Request(arguments[0]).item;
		}						
	}
	function read()
	{
		return Read.apply(this,arguments);
	}
	
	//->获取表单传输参数
	function Post()
	{
		if(arguments.length>1)
		{
			var returnValue=[];
			for(var iarguments=0;iarguments<=arguments.length-1;iarguments++){
				returnValue.push(Request.Form(arguments[iarguments]).item);
			}
			return returnValue;
		}
		else
		{
			return Request.Form(arguments[0]).item;
		}
	}
	function post()
	{
		return Post.apply(this,arguments);
	}
	
	//->获取Url传输参数
	function Get()
	{
		if(arguments.length>1)
		{
			var returnValue=[];
			for(var iarguments=0;iarguments<=arguments.length-1;iarguments++){
				returnValue.push(Request.QueryString(arguments[iarguments]).item);
			}
			return returnValue;
		}
		else
		{
			return Request.QueryString(arguments[0]).item;
		}
	}	
	function get()
	{
		return Get.apply(this,arguments);
	}
	
	//->获取二进制数据
	function ReadBinary($count)
	{
		return Request.BinaryRead($count);
	};
	function readBinary($count)
	{
		return Request.BinaryRead($count);
	};	
	
	//->获取参数集合	
	var HttpParameters=
	{
		get:function()
		{
			var assDataUrl,tempDataUrl={},tempCountUrl=1,tempVar,tempAss;	
				assDataUrl=new Enumerator(Request.QueryString);						
				while(assDataUrl.atEnd()==false)
				{
					tempAss=new Enumerator(Request.QueryString(assDataUrl.item()));
					while(tempAss.atEnd()==false)
					{
						tempVar=tempAss.item();
						if(Object.varType(tempDataUrl[assDataUrl.item()])=='object'){
							tempDataUrl[assDataUrl.item()]['$'+tempCountUrl]=tempVar;	
							tempCountUrl++;
						}
						else{
							tempDataUrl[assDataUrl.item()]=tempVar;	
						}
						tempAss.moveNext();
						if(tempCountUrl==1&&tempAss.atEnd()==false){
							tempDataUrl[assDataUrl.item()]={};
							tempDataUrl[assDataUrl.item()]['$'+tempCountUrl]=tempVar;	
							tempCountUrl++;
						}								
					}
					tempCountUrl=1,tempVar=null,tempAss=null;
					assDataUrl.moveNext();
				}
			return tempDataUrl;
		},
		post:function()
		{
			var assDataForm,tempDataForm={},tempCountForm=1,tempVar,tempAss;			
				assDataForm=new Enumerator(Request.Form);						
				while(assDataForm.atEnd()==false)
				{
					tempAss=new Enumerator(Request.Form(assDataForm.item()));
					while(tempAss.atEnd()==false)
					{
						tempVar=tempAss.item();
						if(varType(tempDataForm[assDataForm.item()])=='object'){
							tempDataForm[assDataForm.item()]['$'+tempCountForm]=tempVar;	
							tempCountForm++;
						}
						else{
							tempDataForm[assDataForm.item()]=tempVar;	
						}
						tempAss.moveNext();
						if(tempCountForm==1&&tempAss.atEnd()==false){
							tempDataForm[assDataForm.item()]={};
							tempDataForm[assDataForm.item()]['$'+tempCountForm]=tempVar;	
							tempCountForm++;
						}								
					}
					tempCountForm=1,tempVar=null,tempAss=null;
					assDataForm.moveNext();
				}
			return tempDataForm;
		},
		coalition:function($postData,$getData)
		{
			var tempData={},_tempText='',_tempArray;		
			for(var _property in postData)
			{
				_tempText+=_property+',';				
			}
			_tempArray=_tempText.toArray();
			//开始拼值
			for(var _property in getData)
			{				
				if(_tempArray.indexOf(_property)!=-1)
				{
					var _tempCount=1,_tempValue='';
					if(varType(getData[_property])!='object'&&varType(postData[_property])!='object')
					{
						_tempValue=getData[_property];
						getData[_property]={};
						getData[_property]['$1']=_tempValue;
						getData[_property]['$2']=postData[_property];
					}
					else
					{
						if(varType(getData[_property])=='object'&&varType(postData[_property])=='object')
						{
							for(var __property in getData[_property])
								_tempCount=Number(__property.substr(__property.length-1,1));
							//开如拼值
							_tempCount+=1;
							for(var __property in postData[_property])
							{
								getData['$'+_tempCount]=postData[_property][__property];
								_tempCount++;
							}
						}
						else
						{
							if(varType(getData[_property])=='object')
							{
								for(var __property in getData[_property])
								{
									_tempCount=Number(__property.substr(__property.length-1,1));
								}
								_tempCount+=1;
								getData['$'+_tempCount]=postData[_property];									
							}
							else																
							{
								_tempValue=getData[_property];
								getData[_property]={};		
								getData[_property]['$1']=_tempValue;
								_tempCount+=1;
								for(var __property in postData[_property])
								{
									getData['$'+_tempCount]=postData[_property][__property];
									_tempCount++;
								}															
							}
						}
					}
					delete postData[_property];
				}
			}
			return tempData=Object.extend(getData,postData);			
		},
		size:function()
		{
			return Request.TotalBytes;
		},
		keys:function($method)
		{},
		value:function($method)
		{},
		queryString:function(){},
		formString:function(){}
	};
	
	/* 服务器变量 */
	var Host=
	{
		allHttp:Request.ServerVariables('ALL_HTTP'),
		allRaw:Request.ServerVariables('ALL_RAW'),
		applMdPath:Request.ServerVariables('APPL_MD_PATH'),
		applPhysicalPath:Request.ServerVariables('APPL_PHYSICAL_PATH'),		
		authPassword:Request.ServerVariables('AUTH_PASSWORD'),
		authType:Request.ServerVariables('AUTH_TYPE'),
		authUser:Request.ServerVariables('AUTH_USER'),
						
		certCookie:Request.ServerVariables('CERT_COOKIE'),
		certFlags:Request.ServerVariables('CERT_FLAGS'),		
		
		gateWayInterface:Request.ServerVariables("GATEWAY_INTERFACE"),
		contentLength:Request.ServerVariables("CONTENT_LENGTH"),
		contentType:Request.ServerVariables("CONTENT_TYPE"),
		
		
		httpAccept:Request.ServerVariables("HTTP_ACCEPT"),
		httpAcceptEncoding:Request.ServerVariables("Http_Accept_Encoding"),
		httpAcceptLanguage:Request.ServerVariables("Http_Accept_Language"),		
		httpConnection:Request.ServerVariables("Http_Connection"),
		httpHost:Request.ServerVariables("Http_HOST"),
		httpReferer:Request.ServerVariables("Http_Referer"),
		httpCookie:Request.ServerVariables("Http_Cookie"),		
		httpUserAgent:Request.ServerVariables("Http_User_Agent"),
		httpUaPixels:Request.ServerVariables("Http_UA_PIXELS"),
		httpUaColor:Request.ServerVariables("Http_UA_COLOR"),
		httpUaOs:Request.ServerVariables("Http_UA_OS"),
		httpUaCpu:Request.ServerVariables("HTTP_UA_CPU"),
		
		instanceId:Request.ServerVariables("INSTANCE_ID"),
		instanceMetaPath:Request.ServerVariables("INSTANCE_META_PATH"),
		localAddr:Request.ServerVariables("LOCAL_ADDR"),
		logonUser:Request.ServerVariables("LOGON_USER"),
		
		pathInfo:Request.ServerVariables("PATH_INFO"),
		pathTranslated:Request.ServerVariables("PATH_TRANSLATED"),
		queryString:Request.ServerVariables("QUERY_STRING"),
		
		remoteAddr:Request.ServerVariables("REMOTE_ADDR"),
		remoteHost:Request.ServerVariables("REMOTE_HOST"),
		requestMethod:Request.ServerVariables("REQUEST_METHOD"),
		
		scriptName:Request.ServerVariables("SCRIPT_NAME"),
		serverName:Request.ServerVariables("SERVER_NAME"),
		serverPort:Request.ServerVariables("SERVER_PORT"),
		serverPortSecure:Request.ServerVariables("SERVER_PORT_SECURE"),
		serverProtocol:Request.ServerVariables("SERVER_PROTOCOL"),
		serverSoftware:Request.ServerVariables("SERVER_SOFTWARE"),
		url:Request.ServerVariables("Url"),
		
		value:function($name)
		{
			if($name==undefined) throw new Error('1');
			return Request.ServerVariables($name);
		}
	};
%>